package com.example.springbootmybatis.mapper;

import com.example.springbootmybatis.domain.Account;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.math.BigDecimal;
import java.util.HashMap;
import java.util.List;

/**
 * @program: springboot_test
 * @description: account
 * @author: Mr. Wu
 * @create: 2024-12-26 14:04
 **/

@Mapper
public interface AccountMapper {

   // @Select("select * from account")
    public List<Account> fromAll();

    public Account selectAccount(@Param("id") Integer id);

    public HashMap selectAccountHashmap(@Param("id") Integer id);

    public boolean insertAccount(Account account);

    public boolean deleteAccount(@Param("id") Integer id);

    public boolean updateAccount(Account account);

    public boolean insertAccountAuto(Account account);

    public boolean insetAccounts(List<Account> accounts);

    public Account selectNameAndMoney(@Param("name") String name, @Param("money")BigDecimal money);
}
